
import requests 
API_URL = "https://api-inference.huggingface.co/models/gpt2"
API_TOKEN = "hf_xxhf_KhRExbDzQJZFOozLkmXeOWHgToKFDEKRxa"
headers = {"Authorization": f"Bearer {API_TOKEN}"}

response = requests.post(API_URL, headers=headers, json={"inputs": "hello,Hugging Face"})
print(response.json())